﻿
Partial Class WebForm_ManageTrainingRegister
    Inherits My.MyPage

    Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
        'ScriptManager.GetCurrent(Me).EnablePartialRendering = False
    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        
        If Not IsPostBack Then
            Me.InitData()
        End If

        Me.Form.Enctype = "multipart/form-data"
    End Sub

    Protected Sub QueryTrainingRegister_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles QueryTrainingRegister1.SelectedIndexChanged

        '單筆檢視模式
        Me.TabContainer1.ActiveTabIndex = 1
        'Me.AddTrainingRegister1.DataAccessMode = FormViewMode.Edit
        Me.AddTrainingRegister1.InitData(Me.QueryTrainingRegister1.SelectedGroupID)

    End Sub

End Class

Partial Class WebForm_ManageTrainingRegister
    Private Sub InitData()

        Me.QueryTrainingRegister1.InitData()

        Me.AddTrainingRegister1.DataAccessMode = WebForm_AddTrainingRegister.EnumDataAccessMode.Edit
        Me.AddTrainingRegister1.InitData(0)

        Me.AddTrainingRegister2.DataAccessMode = WebForm_AddTrainingRegister.EnumDataAccessMode.Verify
        Me.AddTrainingRegister2.InitData(0)

        Me.AddTrainingRegister3.DataAccessMode = WebForm_AddTrainingRegister.EnumDataAccessMode.Check
        Me.AddTrainingRegister3.InitData(0)

        '志工隊長只能看得到報名
        'If clsAuth.GetUser().VolunteerLeader = True Then

        '    VerifyTabPanel.Visible = False
        '    CheckTabPanel.Visible = False

        'End If

        If CanQuery = True AndAlso CanAdmin = False Then
            VerifyTabPanel.Visible = False
            CheckTabPanel.Visible = False
        Else
            VerifyTabPanel.Visible = True
            CheckTabPanel.Visible = True
        End If




    End Sub


    Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
        '處理'GridView' 的控制項 'GridView' 必須置於有 runat=server 的表單標記之中
    End Sub

End Class